//app.js
const API = require("utils/api.js").API;
App({
  onLaunch: function (options) {
      let that = this;
      if (!wx.cloud) {
        console.error('请使用 2.2.3 或以上的基础库以使用云能力')
      } else {               
        wx.cloud.init({
          env:'hm-cust-z4pml',
          traceUser: true,
        })
      }
      wx.getSystemInfo({
      success: function (res) {
          console.log(res);
        that.globalData.statusBarHeight = res.statusBarHeight; //整个可视范围的
       that.globalData.screenWidth = res.screenWidth;
        that.globalData.screenHeight = res.screenHeight;
      // that.globalData.windowHeight = res.windowHeight2; //时间操作范围（常用的）
      // that.globalData.windowWidth = res.windowWidth2;
      // that.globalData.pixelRatio = res.pixelRatio; //分辨率
      // that.globalData.model = res.model; //设备
      }
      });   
  },
  globalData: {
      cheakType:{},
    screenWidth:Number,
    screenHeight:Number,
    statusBarHeight:Number,
    shopID:[],
    cardGoods:[],
    openid:'',
    sum:0,
    options:1001,
    
    recArr:[]
  },
   onShow(options) {
       let that = this;
             that.globalData.options = options.scene;
            console.log("[onLaunch] 本次场景值:", options.scene)
       
    }
})